function plotstrat(dir,exp,run,block,fileroot,numbidlevels)
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
alldata=load(strcat(dir,'\',fileroot,'.strat.results'));
num=length(alldata);
%block=40;

for i=1:num
    if (alldata(i,1)==exp && alldata(i,2)==run && alldata(i,3)==block)
        numstratpieces=alldata(i,5)
        x = zeros(numstratpieces*2,1);
        y = zeros(numstratpieces*2,2);
        for j=1:numstratpieces
            index = i+j-1;
            x(j*2-1) = alldata(index,6);
            y(j*2-1,1) = alldata(index,10)/(numbidlevels-1);
            y(j*2-1,2) = alldata(index,11)/(numbidlevels-1);            
            x(j*2) = alldata(index,7);
            y(j*2,1) = alldata(index,10)/(numbidlevels-1);
            y(j*2,2) = alldata(index,11)/(numbidlevels-1);            
        end;
        break;
    end;
end;



clf
lw=4;
fs=24;

plot(x,y(:,1),'--k','LineWidth', lw);

%[x y(:,1)]
hold on;
plot(x,y(:,2),':k','LineWidth', lw);
xlabel('type', 'FontSize', fs);
%ylabel('bid', 'FontSize', fs);
set(gca,'FontSize',fs);
set(gca,'YTick',[0 0.2 0.4 0.6 0.8 1]);
%set(gca,'YTick',0:1/(numbidlevels-1):1);
%set(gca,'YTickLabel',{'0','0.25','0.5','0.75','1.0'});
xlim([0,1])
ylim([-0.01,1.01])
%ylim([0,1])


legend(['auction 1 bid';'auction 2 bid'],'Location','NorthWest');

hold off;
name = strcat('./strat',fileroot,'_',int2str(exp));
print('-depsc',strcat(name, '.eps'));
%print('-dpdf',strcat(name, '.pdf'));

end

